﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Configuration;

namespace Obvious.Framework.Logging.ConfigHandlers
{
    internal class LogConfigHandler
    {
        private static string _configSectionName = "obviousLoggerGroup/obviousLoggerSection";
        private static ObviousLoggerSection _configSection = null;
        internal static ObviousLoggerSection ConfigSection
        {
            get
            {
                if (_configSection == null)
                {
                    _configSection = (ObviousLoggerSection)ConfigurationManager.GetSection(LogConfigHandler._configSectionName);
                }
                return _configSection;
            }
            
        }
        internal static LoggerProviderElement GetProviderElement(string configName)
        {
            return LogConfigHandler.ConfigSection.LoggerProviders[configName];
        }
    }
}
